package com.javaweb.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.javaweb.admin.entity.KdlStoredoc;
import com.javaweb.admin.entity.NCPOOrder;
import com.javaweb.admin.entity.NCPOOrderDetail;
import com.javaweb.admin.entity.SaleOrder;
import com.javaweb.admin.query.NCPOOrderQuery;
import com.javaweb.admin.query.ReturnQuery;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;

public interface NCPOOrderMapper extends BaseMapper<NCPOOrder> {
    IPage<NCPOOrder> getNCPOOrderList(IPage<NCPOOrder> page, @Param("req") NCPOOrderQuery req);

    @Select("select * from v_kdl_nc_po_order_detial where pk_order=#{pkOrder} order by invcode,vlotno,dprodate")
    List<NCPOOrderDetail> getNCPOOrderDetailList(String pkOrder);

    @Select("select * from v_kdl_nc_billtype where org_code=#{orgcode} and bill=#{bill} order by org_code,billtypename")
    List<String> getBilltypeList(String orgcode,String bill);

}
